<?php 
/*
 module:		会员管理控制器
 create_time:	2023-10-17 09:48:57
 author:		your name
 contact:		your email address
*/

namespace app\admin\validate\Admin;
use think\validate;

class Member extends validate {


	protected $rule = [
		'username'=>['unique:admin_member'],
		'mobile'=>['regex'=>'/^1[3456789]\d{9}$/'],
		'email'=>['regex'=>'/([\w\-]+\@[\w\-]+\.[\w\-]+)/'],
	];

	protected $message = [
		'username.unique'=>'用户名已经存在',
		'mobile.regex'=>'手机号格式错误',
		'email.regex'=>'邮箱格式错误',
	];

	protected $scene  = [
		'add'=>['username','mobile','email'],
		'update'=>['username','mobile','email'],
	];


	

}

